import { Canvas2D } from "./canvas2d/Canvas2D";



// let canvas2d:Canvas2D = new Canvas2D(canvas);


// class Canvas2DUtil {

//     public context: CanvasRenderingContext2D;

//     public constructor(canvas: HTMLCanvasElement) {
//         this.context = canvas.getContext('2d') ?? new CanvasRenderingContext2D();
//     }

//     public drawText(text: string): void {
//         this.context.save();

//         this.context.textBaseline = 'middle';
//         this.context.textAlign = 'center';

//         let centerX: number = this.context.canvas.width * 0.5;
//         let centerY: number = this.context.canvas.height * 0.5;

//         this.context.fillText(text, centerX, centerY);

//         this.context.strokeStyle = 'green';

//         this.context.strokeText(text, centerX, centerY);

//         this.context.restore();

//     }
// }

let canvas= document.getElementById('canvas');

if (canvas === null) {
    console.error('canvas is null');
}

let canvas2d: Canvas2D = new Canvas2D(canvas);
canvas2d.drawText('Hello World From Module!');

